package Scnen3;

import Picture.GameImage;

import java.awt.image.BufferedImage;
import java.util.ArrayList;

public class Sun {
    int x = 900;
    int y = -300;
    BufferedImage img;
    int index = 0;
    ArrayList<BufferedImage> arrayList= new ArrayList<>();
    public Sun(){
        for (int i = 1; i <= 22; i++) {
            arrayList.add(GameImage.get("/Picture/Scene3/太阳/太阳/ ("+i+").png"));
        }
    }
    public void changeImage(){
        if(index == 21){
            index  = 0;
        }
        img = arrayList.get(index);
        index++;
    }
}
